home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / DELPHI32 / DEBUG / STAKWK10 / STAKWALK.PAS < prev    next >
Pascal/Delphi Source File  |  1996-05-10  |  2KB  |  71 lines

  1. unit StakWalk;
  2. {$D- Can't have debug info here! }
  3. { THIS VERSION IS NOT FOR DISTRIBUTION!!!! }
  4. { Changes : changed so that exceptions in exceptions turn it off }
  5. interface
  6.  
  7. uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
  8.   Buttons, ExtCtrls;
  9.  
  10. type
  11.   TWalkerDialog = class(TForm)
  12.     OKBtn: TButton;
  13.     CancelBtn: TButton;
  14.     Bevel1: TBevel;
  15.     Active: TCheckBox;
  16.     Label1: TLabel;
  17.     Label2: TLabel;
  18.     Label3: TLabel;
  19.     Label4: TLabel;
  20.     procedure FormActivate(Sender: TObject);
  21.     procedure FormCreate(Sender: TObject);
  22.   private
  23.     { Private declarations }
  24.   public
  25.     { Public declarations }
  26.   end;
  27.  
  28. var
  29.   WalkerDialog: TWalkerDialog;
  30.  
  31. implementation
  32.  
  33. uses StakLow;
  34.  
  35. {$R *.DFM}
  36.  
  37. function Continue:boolean; far;
  38. begin
  39.   result := false;
  40.   try
  41.     WalkerDialog.ShowModal;
  42.     if WalkerDialog.ModalResult = mrOK then
  43.     begin
  44.       WalkerActive := WalkerDialog.Active.Checked;
  45.       if WalkerActive then
  46.         result := true;
  47.     end;
  48.   except
  49.     result := false;
  50.   end;
  51. end;
  52.  
  53. procedure TWalkerDialog.FormActivate(Sender: TObject);
  54. begin
  55.   Active.Checked := WalkerActive;
  56. end;
  57.  
  58. procedure TWalkerDialog.FormCreate(Sender: TObject);
  59. begin
  60.   if Debughook <> 0 then
  61.   begin
  62.     Application.OnException := StackWalker.HandleException;
  63.     ContinueFunc := Continue;
  64.     if not FoundMap then
  65.       Application.MessageBox('Warning:  StackWalker was unable to find a detailed .MAP file.  You''ll get a lot of bad guesses!',
  66.              'StackWalker',mb_OK+mb_IconWarning);
  67.   end;
  68. end;
  69.  
  70. end.
  71.